perf(ab-testing): add indexes to experiment entity + migration - #1371
perf(ab-testing): add indexes to experiment entity + migration#1371wright2341 wants to merge 10 commits into
Conversation
|
@wright2341 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Well done on the job done so far! |
|
Hi @RUKAYAT-CODER — I've fixed the workflow. The experiment entity now has the |
|
There are still some lint errors. |
|
@rinafcode Hi! This PR is open and ready for review — happy to address any feedback. Thanks! |
|
The work flow is still failing . |
Overview
This PR adds database indexes to the
experimententity so common lookup, filter, sort, and foreign-key query paths no longer trigger sequential scans as the table grows. Indexes are declared via@Indexon the entity and created by a reviewable migration so existing databases are updated without relying onsynchronize.Related Issue
Changes
🗂️ Experiment Entity Indexing
[MODIFY]
src/ab-testing/entities/experiment.entity.ts@Indexdecorators covering the columns used in WHERE / ORDER BY / JOIN / foreign-key lookups.[ADD]
src/migrations/1756475492000-add-experiment-indexes.tsup()creates the same indexes declared on the entity so existing databases are brought in line.down()drops them, keeping the migration reversible.Verification Results
@Indexdecorators added to entitymigration:runon a populated DBCloses #1224